package remote;

import java.io.CharArrayReader;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.sql.ResultSet;


@SuppressWarnings("serial")
class RemoteStatementImpl extends UnicastRemoteObject implements RemoteStatement {


	private RemoteConnectionImpl conn;
	   private RemoteResultSet rst;
	   private boolean auto;
	   
	   public RemoteStatementImpl(RemoteConnectionImpl conn, boolean auto) throws RemoteException {
	      this.conn = conn; this.auto = auto;
	   }
	   
	   @Override
		public boolean execute(String sql) throws RemoteException{
			return false;
			//TODO
		}
	   
	   static String insertTimer = "insert";
	   
		@Override
		public ResultSet getResultSet() throws RemoteException {
			System.out.println("Call getResultSet()");
			return new SimpleResultSet(rst);
		}

		@Override
		public void close() throws RemoteException {
		}
	}
